package initialize

import (
	"server/global"

	"github.com/gin-gonic/gin"
	ginSwagger "github.com/swaggo/gin-swagger"
	"github.com/swaggo/gin-swagger/swaggerFiles"
)

func Router() *gin.Engine {
	var Router = gin.Default()
	global.GVA_LOG.Debug("use middleware logger")
	Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
	global.GVA_LOG.Debug("register swagger handler")
	//ApiGroup := Router.Group("")
	global.GVA_LOG.Info("router register success")
	return Router
}
